/*
* $Id: Operation.h 152 2010-09-23 18:28:55Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Volokitin Aleksey
* All rights reserved
*
*/
#ifndef _OPERATION_H_
#define _OPERATION_H_

#include "InterfaceDb.h"

class CFillContent
{
protected:
	IResult* FillContent(const MyTable& table);
	virtual IOperation::i_content* CreateContent() = 0;
};

class COperation : public IOperation, public CFillContent
{
protected:
	virtual ITable::i_content* CreateContent();
public:
	COperation();
	virtual ~COperation();
	struct content : public ITable::i_content{
		virtual void Clear();
		virtual void Set(const std::vector<CTableItem>& content);
		virtual void Free();
		virtual ~content(){}
	};
public:
	virtual void UpdateValue(IDatabase* pDatabase);
	virtual IResult* GetValue(IDatabase* pDatabase);
	virtual void SetValue(IDatabase* pDatabase);
	virtual void DeleteValue(IDatabase* pDatabase);
	virtual void Free();
};

#endif/*_OPERATION_H_*/